package com.hfkf.javaoop;

/**
 * @Author MDD
 * @Description
 * @Version
 * @Date
 **/
public class Visitor1 {

    String name;
    int age;



    public int buy(){
        if (this.age<=6||this.age>=60){
            return 0;
        }
        else if (this.age>6&&this.age<=18){
            return 17;
        }
        else{
            return 35;
        }
    }


}